import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
import { IsString, IsNotEmpty, IsOptional } from "class-validator";
import { BaseDto } from "@/common/dto";
export class BookDto extends BaseDto {
  @ApiProperty({ description: '书籍名称' })
  @IsString()
  @IsNotEmpty()
  name: string;

  @ApiPropertyOptional({ description: '书籍作者' })
  @IsString()
  @IsOptional()
  author: string;

  @ApiPropertyOptional({ description: '书籍简介' })
  @IsString()
  @IsOptional()
  description: string;
}